<h2 class="ico_settings">New Orders</h2>
{{if $orders<>""}}
<h3>{{$orders->result_count()}} New Order(s)</h3>
{{/if}}
<table id="table" width="100%" >
    <thead>
        <tr>
            <th>Order#</th>
            <th>Customer</th>
            <th>Email</th>
            <th>Payment Method</th>
            <th>Shipping Method</th>
            <th>Total</th>
            <th>Date Placed</th>
            <th>Status</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>

        {{foreach from=$orders item=o}}
        {{assign var=ouser value=$o->get_user_obj()}}
        <tr class="table_row">
            <td>
                {{$o->id}}
            </td>
            <td>
                {{$ouser->username}}
            </td>
            <td>
                {{$ouser->email}}
            </td>
            <td>
                {{ if $o->DYN_order_payment_obj }} {{$o->DYN_order_payment_obj->driver_note}} {{else}} <span style="color:red">n/a</span> {{/if}}
            </td>
            <td>
                {{$o->DYN_order_shipping_charge_obj->description}}
            </td>
            <td>
                ${{$o->DYN_order_total}}
            </td>
            <td>
                {{$o->updated|date_format:"%a, %b %e, %Y , %I:%M %p"}}
            </td>
            <td>
                {{$o->status}}
            </td>
            <td>
                <img src="{{$core_images}}/common/view_details.png" title="View order details" onclick="document.location='{{$base_index_url}}/order/admin/edit_orders/order_id/{{$o->id}}'"/>
                &nbsp;
                <img src="{{$core_images}}/common/delete.png" title="Delete this order" />
            </td>
        </tr>
        {{/foreach}}
    </tbody>
</table>
